<template>
    <view>
        <view class="uni-padding-wrap uni-common-mt">
			<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
								@scrolltolower="lower" @scroll="scroll">
				<view class="videoWarp" v-for="(item,index) in videoList" :key="index">
				<!-- <view class="videoWarp"> -->
				    <video id="myVideo" :src="'../../static/video/'+ item +'.mp4'"
				        @error="videoErrorCallback" enable-danmu danmu-btn controls loop="true" @pause="pause"></video>
				</view>
			</scroll-view>
            
            <!-- #ifndef MP-ALIPAY -->
            <!-- <view class="uni-list uni-common-mt">
                <view class="uni-list-cell">
                    <view>
                        <view class="uni-label">弹幕内容</view>
                    </view>
                    <view class="uni-list-cell-db">
                        <input v-model="danmuValue" class="uni-input" type="text" placeholder="在此处输入弹幕内容" />
                    </view>
                </view>
            </view> -->
            <!-- <view class="uni-btn-v">
                <button @click="sendDanmu" class="page-body-button">发送弹幕</button>
            </view> -->
            <!-- #endif -->
        </view>
    </view>
</template>

<script>
	export default {
		name:"Videos",
		data() {
			return {
				videoList: ['01','02','03','04','05'],
				scrollTop: 0
			};
		},
		methods: {
			upper(e){
				console.log(e);
			},
			pause(){
				
			}
		}
	}
</script>

<style>
#myVideo{
	width: 100%;
	height: 100vh;
}
.videoWarp{
	width: 100%;
	flex: 1;
	/* height: 100vh; */
	/* position: absolute; */
	background: white;
}
</style>